Mapbox

The entry point to initialize the MapLibre Android SDK.

Obtain a reference by calling getInstance. Usually this class is configured in Application#onCreate() and is responsible for the active API key, application context, and connectivity state.

Functions

Link copied to clipboard
Application context
Link copied to clipboard
open fun getInstance(@NonNull context: Context, @Nullable apiKey: String, tileServer: WellKnownTileServer): Mapbox
Get an instance of Mapbox.
Link copied to clipboard
Get predefined style by name
Link copied to clipboard
Get all pre-defined styles
Link copied to clipboard
open fun hasInstance(): Boolean
Internal use.
Link copied to clipboard
open fun isConnected(): Boolean
Determines whether we have an internet connection available.
Link copied to clipboard
open fun setConnected(connected: Boolean)
Manually sets the connectivity state of the app.
Link copied to clipboard
Throws exception when access token is invalid

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard